//
//  TLPswVerfyViewController.m
//  FunnyVideo
//
//  Created by 李鑫 on 15/11/3.
//  Copyright © 2015年 NewEggTech. All rights reserved.
//
#import "AVOSManger.h"
#import <AVOSCloud/AVOSCloud.h>
#import "TLPswVerfyViewController.h"

@interface TLPswVerfyViewController ()

@end

@implementation TLPswVerfyViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)vfCodeEditEnd:(id)sender {
    [self.vfTF resignFirstResponder];
    [self confirmVFCode:nil];
}

- (IBAction)confirmVFCode:(id)sender {
    [AVUser resetPasswordWithSmsCode:self.vfTF.text newPassword:self.nPsw.text block:^(BOOL succeeded, NSError *error) {
        dispatch_async(dispatch_get_main_queue(), ^{
        if(succeeded)
        {
            [TLAlertHelper showSuccessHUDWithText:@"修改成功"];
        }
        else{
            [TLAlertHelper showErrorHUDWithText:@"修改失败"];
        }
        });
        
            
    }];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
